// pages/releaseinfo/releaseinfo.js
var utils = require('../../utils/util.js');
var httpUrl = getApp().globalData.httpUrl;
var codeName = getApp().globalData.codeName;
Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataList:[]
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    utils.http(httpUrl + "getmodelList", {
      code: codeName
    }, function (res) {
      console.log(res);
      that.setData({
        dataList: res.merchantlist
      })
    })
  },
  //跳入商家入驻
  oNbusinessSettledTop:function(e){
    wx.navigateTo({
      url: '../business_settled/business_settled',
    })
  },


  //发布房产信息
  oNreleaseTap:function(e){
    var type = e.currentTarget.dataset.types;
    var typeName=e.currentTarget.dataset.typename;
    var typeid = e.currentTarget.dataset.typeid;
    console.log(type);
    //1发布房产相关信息
    if(type=="1"){
      wx.navigateTo({
        url: '../releaseinfo/release_home/release_home?typename=' + typeName + "&typeid=" + typeid,
      });
    }else{
      //发布其它信息
     wx.navigateTo({
       url: '../releaseinfo/release_others/release_others?typename=' + typeName + "&typeid=" + typeid,
     })
    }

  }

})